package Data_Structure.Stack;

import java.util.Stack;

/**
 * @className: Test1
 * @author: 芃
 * @description: 测试模拟栈
 * @date: 2023/8/21 16:04
 */
public class Test1 {
    //栈：先进后出的一种数据结构
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        System.out.println(myStack.isEmpty());
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        myStack.push(4);
        myStack.push(5);
        System.out.println(myStack.peek());
        System.out.println(myStack.pop());
        System.out.println(myStack.peek());
    }
}
